package demo1;

public class java2 {
	public static void main(String[] agrs){
		System.out.println(Method2(100));
	}
	public static int Method2(int num){
		int sum=0;
		for(int i=1;i<=num;i++){
			if(i%2!=0){
				sum+=i;
			}
			return sum;
		}
	}
}
